import {apiClient} from "@/utils/request";


//添加商品到购物车

export const saveCartFun = (data:any) => {
    return apiClient({
      url: '/car/cart-info/save',
      method: 'post',
      data:data
    })
  };

  // 获取购物车列表
export const getAllCartFun = () => {
    return apiClient({
      url: '/car/cart-info/getList',
      method: 'get',
    })
  };

  // 删除购物车
export const DeleteByIdCartFun = (id:number) => {
    return apiClient({
      url: '/car/cart-info/deleteById/'+id,
      method: 'delete',
    })
  };

// 修改购物车的选中状态
export const UpdateSelectCartFun = (data:any) => {
  return apiClient({
    url: '/car/cart-info/updateSelect',
    method: 'put',
    data: data
  })
};


